<?php
// aggregate_hour.php
include 'aggregate.php';

// header('Content-type: text/csv');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past

$id = getParm('id','1');
$variable = getParm('var','0014');
$span = getParm('span','r');

$hour = '2010-10-05 17:00:00';
 
$db = include 'dbiConnect.php';
$kwh = calculateHour($db, $id, $variable, $hour);
echo $kwh;
$db->close();
?>
